home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / telecomm / misc / ami2guidev1a.lha / aminet2guide / a2g.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-02-10  |  3.1 KB  |  81 lines

  1. /************/
  2. /* a2g.rexx */
  3. /************/
  4.  
  5. /*******************************************************************/
  6. /*                                                                 */
  7. /* Author: T. B. Kreuzer                                           */
  8. /*                                                                 */
  9. /* Version: 1.1                                                    */
  10. /*                                                                 */
  11. /* Description: This ARexx script will save the current Term       */
  12. /*              buffer (should contain Aminet RECENT or INDEX      */
  13. /*              listing) to "RAM:Aminet", convert it to an         */
  14. /*              AmigaGuide file, and execute AmigaGuide so that    */
  15. /*              the AmigaGuide display is opened on the Term       */
  16. /*              screen.                                            */
  17. /*                                                                 */
  18. /* Pre-requisites: 1) ARexx must be active                         */
  19. /*                 2) Term must be active                          */
  20. /*                 3) "Aminet2Guide" program is in the C:          */
  21. /*                    directory                                    */
  22. /*                 4) "AmigaGuide" program is in the SYS:Utilities */
  23. /*                    directory                                    */
  24. /*                                                                 */
  25. /* WARNING: This script should ONLY be run from OUTSIDE the Term   */
  26. /*          program (i.e., from the CLI/Shell).  For some unknown  */
  27. /*          reason, running this from within Term causes the Term  */
  28. /*          screen to go blank!                                    */
  29. /*                                                                 */
  30. /* Version Information                                             */
  31. /* -------------------                                             */
  32. /* Version 1.1 - The script will now automatically save the        */
  33. /*               current Term buffer to "RAM:Aminet", eliminating  */
  34. /*               the need for the user to do a manual file save    */
  35. /*                                                                 */
  36. /* Version 1.0 - Initial release                                   */
  37. /*                                                                 */
  38. /*******************************************************************/
  39.  
  40.  
  41. OPTIONS RESULTS
  42.  
  43.  
  44. ADDRESS command
  45.  
  46. /* Delete any old Aminet output from a previous run */
  47.  
  48. 'C:Delete >NIL: RAM:Aminet'
  49. 'C:Delete >NIL: RAM:Aminet.guide'
  50.  
  51.  
  52. ADDRESS term
  53.  
  54. /* Save current Term buffer to "RAM:Aminet" */
  55.  
  56. SAVEAS NAME 'RAM:Aminet' from Buffer
  57.  
  58.  
  59. ADDRESS command
  60.  
  61. /* Convert "RAM:Aminet" output to AmigaGuide format */
  62.  
  63. 'C:Aminet2Guide RAM:Aminet RAM:Aminet.guide'
  64.  
  65. /* Wait until output AmigaGuide file has been created */
  66.  
  67. loop:
  68. 'C:List >NIL: RAM:Aminet.guide'
  69.  
  70. if RC ~= 0 THEN SIGNAL loop
  71.  
  72. /* Invoke AmigaGuide on the output AmigaGuide file */
  73.  
  74. /* Have AmigaGuide window open on the TERM public screen */
  75.  
  76. 'Run SYS:Utilities/AmigaGuide PUBSCREEN TERM RAM:Aminet.guide'
  77.  
  78. /* End of script */
  79.  
  80. EXIT
  81.